package cn.cau.service.impl;
import cn.cau.dao.CodeRuleDao;
import cn.cau.entity.CodeRule;
import cn.cau.service.CodeRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CodeRuleIServiceImpl implements CodeRuleService {
    @Autowired
    private CodeRuleDao codeRuleDao;
    @Override
    public CodeRule findCodeRuleById(int codeRuleId){
        return codeRuleDao.findCodeRuleById(codeRuleId);
    }
    @Override
    public List<CodeRule> findCodeRuleAll(){
        return codeRuleDao.findCodeRuleAll();
    }
    @Override
    public int insertCodeRule(CodeRule codeRule){
        return codeRuleDao.insertCodeRule(codeRule);
    }
    @Override
    public int saveCodeRule(CodeRule codeRule) {
        return 0;
    }
    @Override
    public int updateCodeRule(CodeRule codeRule) { return codeRuleDao.updateCodeRule(codeRule); }
    @Override
    public List<CodeRule> findCodeRuleByName(String name) { return codeRuleDao.findCodeRuleByName(name); }
    @Override
    public List<CodeRule> findCodeRuleByCategoryId(int categoryId){return codeRuleDao.findCodeRuleByCategoryId(categoryId);}

}
